/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.tech15.task.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.tech15.pub.model.*;
import com.tech15.pub.dao.*;
import com.tech15.pub.service.*;
import com.tech15.pub.vo.query.*;

/**
 * @author 胡作正 email:zuozhenghu@sina.com
 * @version 1.0
 * @since 1.0
 */


@Entity
@Table(name = "ZDXZDC")
public class Zdxzdc extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "重点行政督办";
	public static final String ALIAS_ID = "序号";
	public static final String ALIAS_RQ = "日期";
	public static final String ALIAS_XGGZ = "相关工作项";
	public static final String ALIAS_JTYQ = "具体要求";
	public static final String ALIAS_QCR = "起草人";
	public static final String ALIAS_QCSJ = "起草时间";
	public static final String ALIAS_SPR = "审核人";
	public static final String ALIAS_SPSJ = "审核时间";
	public static final String ALIAS_FGLD = "分管领导";
	public static final String ALIAS_ZXR = "执行人";
	public static final String ALIAS_WCQK = "完成情况";
	public static final String ALIAS_SPZT = "审批状态（0待审批 1完成 2退回）";
	public static final String ALIAS_ZXZT = "执行状态（-1未执行 0执行中 1完成 2退回）";
	public static final String ALIAS_QCRXM = "起草人姓名";
	public static final String ALIAS_SPRXM = "审批人姓名";
	public static final String ALIAS_FGLDXM = "分管领导姓名";
	public static final String ALIAS_ZXRXM = "执行人姓名";
	public static final String ALIAS_XYGZJH = "下一步工作计划";
	
	//date formats
	public static final String FORMAT_RQ = DATE_FORMAT;
	public static final String FORMAT_QCSJ = DATE_FORMAT;
	public static final String FORMAT_SPSJ = DATE_FORMAT;
	

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * 序号       db_column: ID 
     */ 	
	@Length(max=32)
	private java.lang.String id;
    /**
     * 日期       db_column: RQ 
     */ 	
	
	private java.util.Date rq;
    /**
     * 相关工作项       db_column: XGGZ 
     */ 	
	@Length(max=200)
	private java.lang.String xggz;
    /**
     * 具体要求       db_column: JTYQ 
     */ 	
	@Length(max=600)
	private java.lang.String jtyq;
    /**
     * 起草人       db_column: QCR 
     */ 	
	
	private Long qcr;
    /**
     * 起草时间       db_column: QCSJ 
     */ 	
	
	private java.util.Date qcsj;
    /**
     * 审核人       db_column: SPR 
     */ 	
	
	private Long spr;
    /**
     * 审核时间       db_column: SPSJ 
     */ 	
	
	private java.util.Date spsj;
    /**
     * 分管领导       db_column: FGLD 
     */ 	
	
	private Long fgld;
    /**
     * 执行人       db_column: ZXR 
     */ 	
	
	private Long zxr;
    /**
     * 完成情况       db_column: WCQK 
     */ 	
	@Length(max=600)
	private java.lang.String wcqk;
    /**
     * 审批状态（0待审批 1完成 2退回）       db_column: SHZT 
     */ 	
	@Max(127)
	private Integer spzt;
    /**
     * 执行状态（-1未执行 0执行中 1完成 2退回）       db_column: ZXZT 
     */ 	
	@Max(127)
	private Integer zxzt;
    /**
     * 起草人姓名       db_column: QCRXM 
     */ 	
	@Length(max=30)
	private java.lang.String qcrxm;
    /**
     * 审批人姓名       db_column: SHRXM 
     */ 	
	@Length(max=30)
	private java.lang.String sprxm;
    /**
     * 分管领导姓名       db_column: FGLDXM 
     */ 	
	@Length(max=30)
	private java.lang.String fgldxm;
    /**
     * 执行人姓名       db_column: ZXRXM 
     */ 	
	@Length(max=30)
	private java.lang.String zxrxm;
	/**
     * 下一步工作计划       db_column: XYGZJH 
     */ 	
	@Length(max=600)
	private java.lang.String xygzjh;
	/**
     * 是否已完成（-1未执行 0执行中 1完成 2退回）       db_column: ZXZT 
     */ 	
	@Max(127)
	private Integer isywc;
	
	/**
     * 领导批示       db_column: LDPS 
     */ 	
	@Length(max=600)
	private java.lang.String ldps;
	
	@Max(127)
	private Integer lb;
	
	//columns END


	public Zdxzdc(){
	}

	public Zdxzdc(
		java.lang.String id
	){
		this.id = id;
	}

	

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "uuid.hex")
	@Column(name = "ID", unique = true, nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getId() {
		return this.id;
	}
	
	@Transient
	public String getRqString() {
		return DateConvertUtils.format(getRq(), FORMAT_RQ);
	}
	public void setRqString(String value) {
		setRq(DateConvertUtils.parse(value, FORMAT_RQ,java.util.Date.class));
	}
	
	@Column(name = "RQ", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getRq() {
		return this.rq;
	}
	
	public void setRq(java.util.Date value) {
		this.rq = value;
	}
	
	@Column(name = "XGGZ", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getXggz() {
		return this.xggz;
	}
	
	public void setXggz(java.lang.String value) {
		this.xggz = value;
	}
	
	@Column(name = "JTYQ", unique = false, nullable = true, insertable = true, updatable = true, length = 600)
	public java.lang.String getJtyq() {
		return this.jtyq;
	}
	
	public void setJtyq(java.lang.String value) {
		this.jtyq = value;
	}
	
	@Column(name = "QCR", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getQcr() {
		return this.qcr;
	}
	
	public void setQcr(Long value) {
		this.qcr = value;
	}
	
	@Transient
	public String getQcsjString() {
		return DateConvertUtils.format(getQcsj(), FORMAT_QCSJ);
	}
	public void setQcsjString(String value) {
		setQcsj(DateConvertUtils.parse(value, FORMAT_QCSJ,java.util.Date.class));
	}
	
	@Column(name = "QCSJ", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getQcsj() {
		return this.qcsj;
	}
	
	public void setQcsj(java.util.Date value) {
		this.qcsj = value;
	}
	
	@Column(name = "SPR", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getSpr() {
		return this.spr;
	}
	
	public void setSpr(Long value) {
		this.spr = value;
	}
	
	@Transient
	public String getSpsjString() {
		return DateConvertUtils.format(getSpsj(), FORMAT_SPSJ);
	}
	public void setSpsjString(String value) {
		setSpsj(DateConvertUtils.parse(value, FORMAT_SPSJ,java.util.Date.class));
	}
	
	@Column(name = "SPSJ", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getSpsj() {
		return this.spsj;
	}
	
	public void setSpsj(java.util.Date value) {
		this.spsj = value;
	}
	
	@Column(name = "FGLD", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getFgld() {
		return this.fgld;
	}
	
	public void setFgld(Long value) {
		this.fgld = value;
	}
	
	@Column(name = "ZXR", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getZxr() {
		return this.zxr;
	}
	
	public void setZxr(Long value) {
		this.zxr = value;
	}
	
	@Column(name = "WCQK", unique = false, nullable = true, insertable = true, updatable = true, length = 600)
	public java.lang.String getWcqk() {
		return this.wcqk;
	}
	
	public void setWcqk(java.lang.String value) {
		this.wcqk = value;
	}
	
	@Column(name = "SPZT", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getSpzt() {
		return this.spzt;
	}
	
	public void setSpzt(Integer value) {
		this.spzt = value;
	}
	
	@Column(name = "ZXZT", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getZxzt() {
		return this.zxzt;
	}
	
	public void setZxzt(Integer value) {
		this.zxzt = value;
	}
	
	@Column(name = "QCRXM", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getQcrxm() {
		return this.qcrxm;
	}
	
	public void setQcrxm(java.lang.String value) {
		this.qcrxm = value;
	}
	
	@Column(name = "SPRXM", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getSprxm() {
		return this.sprxm;
	}
	
	public void setSprxm(java.lang.String value) {
		this.sprxm = value;
	}
	
	@Column(name = "FGLDXM", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getFgldxm() {
		return this.fgldxm;
	}
	
	public void setFgldxm(java.lang.String value) {
		this.fgldxm = value;
	}
	
	@Column(name = "ZXRXM", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getZxrxm() {
		return this.zxrxm;
	}
	
	public void setZxrxm(java.lang.String value) {
		this.zxrxm = value;
	}
	
	@Column(name = "XYGZJH", unique = false, nullable = true, insertable = true, updatable = true, length = 600)
	public java.lang.String getXygzjh() {
		return this.xygzjh;
	}
	
	public void setXygzjh(java.lang.String value) {
		this.xygzjh = value;
	}
	
	@Column(name = "ISYWC", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getIsywc() {
		return isywc;
	}

	public void setIsywc(Integer isywc) {
		this.isywc = isywc;
	}
	
	@Column(name = "LDPS", unique = false, nullable = true, insertable = true, updatable = true, length = 600)
	public java.lang.String getLdps() {
		return this.ldps;
	}
	
	public void setLdps(java.lang.String value) {
		this.ldps = value;
	}
	
	@Column(name = "Lb", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getLb() {
		return lb;
	}

	public void setLb(Integer lb) {
		this.lb = lb;
	}
	
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Rq",getRq())
			.append("Xggz",getXggz())
			.append("Jtyq",getJtyq())
			.append("Qcr",getQcr())
			.append("Qcsj",getQcsj())
			.append("Spr",getSpr())
			.append("Spsj",getSpsj())
			.append("Fgld",getFgld())
			.append("Zxr",getZxr())
			.append("Wcqk",getWcqk())
			.append("Spzt",getSpzt())
			.append("Zxzt",getZxzt())
			.append("Qcrxm",getQcrxm())
			.append("Sprxm",getSprxm())
			.append("Fgldxm",getFgldxm())
			.append("Zxrxm",getZxrxm())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Zdxzdc == false) return false;
		if(this == obj) return true;
		Zdxzdc other = (Zdxzdc)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
	
	private Long userid;
	private String rqBegin;
	private Integer ztbs;
	private Long[] execUsers;
	private List<ZdxzdcCljl> cljlList;
	private String jlid;
	private ZdxzdcCljl cljl;

	@Transient
	public ZdxzdcCljl getCljl() {
		return cljl;
	}

	public void setCljl(ZdxzdcCljl cljl) {
		this.cljl = cljl;
	}

	@Transient
	public String getJlid() {
		return jlid;
	}

	public void setJlid(String jlid) {
		this.jlid = jlid;
	}

	@Transient
	public List<ZdxzdcCljl> getCljlList() {
		return cljlList;
	}

	public void setCljlList(List<ZdxzdcCljl> cljlList) {
		this.cljlList = cljlList;
	}
	@Transient
	public Long[] getExecUsers() {
		return execUsers;
	}

	public void setExecUsers(Long[] execUsers) {
		this.execUsers = execUsers;
	}
	
	@Transient
	public Integer getZtbs() {
		return ztbs;
	}

	public void setZtbs(Integer ztbs) {
		this.ztbs = ztbs;
	}

	@Transient
	public String getRqBegin() {
		return rqBegin;
	}

	public void setRqBegin(String rqBegin) {
		this.rqBegin = rqBegin;
	}

	@Transient
	public Long getUserid() {
		return userid;
	}

	public void setUserid(Long userid) {
		this.userid = userid;
	}
}

